﻿Public Class frmOptions
    Public Sub Main() Handles Me.Load
        txtFbUrl.Width = ClientSize.Width - (2 * txtFbUrl.Left)
        txtFbToken.Width = ClientSize.Width - (2 * txtFbToken.Left)
        txtFbUrl.Text = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbUrl", "")
        txtFbToken.Text = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbToken", "")
        txtFbBillingInc.Text = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbBillingInc", ".5")
    End Sub
    Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
        Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbUrl", Trim(txtFbUrl.Text))
        Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbToken", Trim(txtFbToken.Text))
        Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\FreshMobile\", "fbBillingInc", Trim(txtFbBillingInc.Text))
        Me.Hide()
        FreshMobile.LoadFreshMobile()
    End Sub
    Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
        Me.Hide()
    End Sub
End Class
